Skip to content

fix(@angular/build): allow application assets in workspace root#32309

Merged
clydin merged 1 commit intoangular:mainfrom
clydin:application/asset-roots
Jan 16, 2026
Merged

fix(@angular/build): allow application assets in workspace root#32309
clydin merged 1 commit intoangular:mainfrom
clydin:application/asset-roots

Conversation

@clydin
Copy link
Member

@clydin clydin commented Jan 15, 2026

This commit refactors normalizeAssetPatterns to:

  1. Allow asset paths located in the workspace root or project root, relaxing the previous strict requirement of being within the source root.
  2. Determine the output path by calculating the relative path from the most specific root (source, project, or workspace) to the asset input.
  3. Remove the unused MissingAssetSourceRootException class in favor of a standard Error with a clear message.

This enables users to include workspace-level assets (like LICENSE or README.md) using the shorthand string syntax without errors.

Closes: #32305

@clydin clydin added the target: patch This PR is targeted for the next patch release label Jan 15, 2026
This commit refactors `normalizeAssetPatterns` to:
1. Allow asset paths located in the workspace root or project root, relaxing the previous strict requirement of being within the source root.
2. Determine the output path by calculating the relative path from the most specific root (source, project, or workspace) to the asset input.
3. Remove the unused `MissingAssetSourceRootException` class in favor of a standard `Error` with a clear message.

This enables users to include workspace-level assets (like `LICENSE` or `README.md`) using the shorthand string syntax without errors.
@clydin clydin force-pushed the application/asset-roots branch from a8d0eff to 4784fe7 Compare January 15, 2026 20:56
@clydin clydin marked this pull request as ready for review January 15, 2026 20:57
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 15, 2026
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 16, 2026
@clydin clydin merged commit b3de0de into angular:main Jan 16, 2026
37 checks passed
@clydin
Copy link
Member Author

clydin commented Jan 16, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the application/asset-roots branch January 16, 2026 14:36
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when running test with vitest after upgrading from v21.0 to v21.1

2 participants